package com.tg.paw.ums.service;

import com.tg.paw.ums.entity.Permission;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 权限 服务类
 * </p>
 *
 * @author Rubble
 * @since 2020-10-22
 */
public interface IPermissionService extends IService<Permission> {

    /**
     * 查询子权限
     * @param parentId
     * @return
     */
    List<Permission> getPermissionByParentId(Long parentId);

    /**
     * 获取children树
     * @param permission
     */
    void fetchChildrenTree(Permission permission);

    /**
     * 获取用户权限
     * @param adminId
     * @return
     */
    List<Permission> getUserPermissions(Long adminId);
}
